import { _decorator, Component, Node, Sprite } from 'cc';
import VMLabel from 'db://app-game/libs/model-view/VMLabel';
import VMProgress from 'db://app-game/libs/model-view/VMProgress';
import { GameMVVMName } from '../../../../common/config/GameMVVM';

const { ccclass, property } = _decorator;

/** 角色状态视图 */
@ccclass('RoleViewLoader')
export class RoleViewLoader extends Component {
  hpProgressSpri: Sprite;
  protected onLoad(): void {
    // 1.绑定游戏角色血量进度条
    // let hpNode = this.node.getChildByName('hp').getChildByName('progress-bar');
    // const hpp = hpNode.addComponent(VMProgress);
    // hpp.componentProperty = `${GameMVVMName.Role}.hp`;
    // hpp.componentName = '';
    // hpp.watchPathArr = ['hp', 'mp'];
    // // 2.绑定游戏角色血量进度条
    // this.hpProgressNode = this.node.getChildByName('hpProgress');
    // const hpProgress = this.hpProgressNode.addComponent(VMProgress);
    // this.mpLabelNode = this.node.getChildByName('mpLabel');
    // this.mpProgressNode = this.node.getChildByName('mpProgress');
  }
}
